package cn.yuanqiao.manage.mapper;

import cn.yuanqiao.manage.domain.YqdaApplyModel;
import com.alibaba.fastjson2.JSONArray;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * applymodelMapper接口
 *
 * @author 赵常飞
 * @date 2023-06-16
 */
public interface YqdaApplyModelMapper
{
    /**
     * 查询applymodel
     *
     * @param menuId 菜单id
     * @param categoryId 门类id
     * @return applymodel
     */
    public YqdaApplyModel selectYqdaApplyModelById(Long menuId, Long categoryId);

    /**
     * 查询applymodel列表
     *
     * @param yqdaApplyModel applymodel
     * @return applymodel集合
     */
    public List<YqdaApplyModel> selectYqdaApplyModelList(YqdaApplyModel yqdaApplyModel);

    /**
     * 新增applymodel
     *
     * @param yqdaApplyModel applymodel
     * @return 结果
     */
    public int insertYqdaApplyModel(YqdaApplyModel yqdaApplyModel);

    /**
     * 修改applymodel
     *
     * @param yqdaApplyModel applymodel
     * @return 结果
     */
    public int updateYqdaApplyModel(YqdaApplyModel yqdaApplyModel);

    /**
     * 删除applymodel
     *
     * @param Id applymodel主键
     * @return 结果
     */
    public int deleteYqdaApplyModelById(Long Id);

    /**
     * 批量删除applymodel
     *
     * @param categoryId 门类id
     * @param menuId 菜单id
     * @return 结果
     */
    public int deleteYqdaApplyModel(Long categoryId,Long menuId);

    int clonefield(@Param("categoryId")Long categoryId, @Param("clonedmenuId") Long clonedmenuId, @Param("clonetomenuIds") JSONArray clonetomenuIds);

    List<Map<String, String>> selectYqdaApplyModelListmenu(@Param("menuName") String menuName, @Param("categoryId") Long categoryId);

    String getfieldlist(Long menuId, Long categoryId, String field);

    List<Map<String, String>> getmenulist(Long categoryId);

    List<Map<String, String>> getmenu(@Param("categoryId")Long categoryId);

    List<Map<String, String>> getmdatalist(@Param("field")String field, @Param("categoryId") Long categoryId, @Param("type") Integer type, @Param("sql") String sql);

    String getSingle(@Param("sql")String sql);

    List<Map<String,Object>> getstringforchange(@Param("groupId")Long groupId, @Param("realfield")String realfield);

    int updateYqdaApplyModelbygroupid(@Param("id")Long id, @Param("realfield")String realfield, @Param("value") String value);

    int deletebycatemenu(@Param("categoryId")Long categoryId,@Param("menuIds") com.alibaba.fastjson.JSONArray menuIds);

}
